using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;

public class ProgressionInstanceController:MonoBehaviour {

	TextMeshProUGUI text;
	[SerializeField] Image progressionBar;

	private void Start() {
		text=GetComponentInChildren<TextMeshProUGUI>();
	}

	public void SetValue(bool isActive,float position,string name,float amount) {
		if(!isActive) {
			gameObject.SetActive(false);
			return;
		}
		gameObject.SetActive(true);
		transform.localPosition=Vector3.up*position;
		text.text=name;
		progressionBar.fillAmount=amount;

	}

}
